﻿namespace ScrumLite.Services
{
    using System;
    using System.Collections.Generic;
    using System.Collections.ObjectModel;
    using System.ServiceModel;
    using Contracts;

    [ServiceContract]
    public interface IDefectsService
    {
        [OperationContract]
        Collection<Defect> GetDefects(string projectId, byte triaged);

        [OperationContract]
        Defect[] GetDefectsByDeliverable(string projectId, string deliverableId);

        [OperationContract]
        Defect GetDefect(string projectId, int moniker);

        [OperationContract]
        void AddDefect(Defect defect);

        [OperationContract]
        void UpdateDefect(Defect defect);

        [OperationContract]
        void DeleteDefect(Guid defectId);

        [OperationContract]
        int GetNextMoniker(string projectId);

        [OperationContract]
        void SaveDefects(Defect[] defects);
    }
}
